#include<stdio.h>
#include<string.h>
#include<unistd.h>
#include<fcntl.h>
int main()
{
  const char*msg="i like linux!\n";
  int fp=open("bite.txt",O_CREAT|O_RDWR,0666);
  write(fp,msg,strlen(msg));
  lseek(fp,0,SEEK_SET);
  char buffer[128];
  memset(buffer,0,sizeof(buffer));
  int n=read(fp,buffer,sizeof(buffer));
  if(n>0)
  {
    printf("%s",buffer);
  }
  close(fp);
  return 0;
}
